home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / system-tools-backends-2.0 / scripts / SystemToolsBackends.pl < prev    next >
Encoding:
Perl Script  |  2007-03-12  |  1.5 KB  |  51 lines

  1. #!/usr/bin/env perl
  2. #-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  3.  
  4. # Loader for the system tools backends.
  5. #
  6. # Copyright (C) 2005 Carlos Garnacho
  7. #
  8. # Authors: Carlos Garnacho Parro  <carlosg@gnome.org>
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU Library General Public License as published
  12. # by the Free Software Foundation; either version 2 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # This program is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. # GNU Library General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU Library General Public License
  21. # along with this program; if not, write to the Free Software
  22. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
  23.  
  24. use lib "/usr/share//system-tools-backends-2.0/scripts";
  25. use lib "/usr/lib/perl5";
  26.  
  27. our $localstatedir = "/var";
  28.  
  29. BEGIN {
  30.   my $i = 0;
  31.  
  32.   # Clean undesired entries in @INC
  33.   while ($INC[$i]) {
  34.     delete $INC[$i] if ($INC[$i] =~ /^@/);
  35.     $i++;
  36.   }
  37. }
  38.  
  39. use Net::DBus;
  40. use Net::DBus::Service;
  41. use Net::DBus::Reactor;
  42. use Utils::Backend;
  43. use Utils::Monitor;
  44. use Utils::Platform;
  45.  
  46. # Initialize tool
  47. &Utils::Backend::init ($name, $version, $description, $directives, @ARGV);
  48.  
  49. require $Utils::Backend::tool{"module"};
  50. &Utils::Backend::run ();
  51.